<template>
  <div>
    <h2>病 害 详 细 信 息</h2>
    <div class="info">
      <div class="left">
        <p>名称：{{ mouse.mouseName }}</p>
        <p>繁殖：{{ mouse.mouseMultiply }}</p>
        <p>食物：{{ mouse.mouseFood }}</p>
        <p>天敌：{{ mouse.mouseSentinel }}</p>
        <p>防治措施：{{ mouse.mouseControl }}</p>
      </div>
      <div class="right">
        <img :src="/api/ + mouse.mousePic" alt="未找到" />
        <br /><br /><br />
        <p>主要危害：{{ mouse.mouseMainHarm }}</p>
      </div>
    </div>
    <el-row>
      <el-button plain @click="back()">返回</el-button>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      mouseId: "",
      mouse: "",
    };
  },
  methods: {
    async getMouseInfo(mouseId) {
      let paramObj = { mouseId: mouseId };
      let info = await this.ajax.getSubmit("/api/mouse/get", paramObj);
      console.log(info);
      this.mouse = info;
    },
    back() {
      this.$router.push("/home/mouse");
    },
  },
  created() {
    //console.log(this.$route.query.diseaseId);
    this.mouseId = this.$route.query.mouseId;
    this.getMouseInfo(this.mouseId);
  },
};
</script>

<style>
</style>